import axios from '../request';
import { GoodSaveInfo } from '../model/goods';

// 获取商品分类列表
export const lists = () => {
  return axios.post<any>(`/api/goodscategory/lists`, {});
};
//代下单-商品列表
export const getgoodslists = (parmas: any) => {
  return axios.post<any>(`/api/goods/getgoodslists`, parmas);
};
//代下单-获取商品规格列表
export const getGoodsSku = (parmas: any) => {
  return axios.post<any>(`/api/goods/getGoodsSku`, parmas);
};
//代下单-购物车内商品数量和总价格
export const calculate = (parmas: any) => {
  return axios.post<any>(`/api/goods/calculate`, parmas);
};
//代下单-会员等级列表
export const vipLists = () => {
  return axios.post<any>(`/api/memberlevel/lists`, {});
};
//代下单-通过手机号查询会员信息
export const searchMemberByMobile = (parmas: any) => {
  return axios.post<any>(`/api/member/searchMemberByMobile`, parmas);
};
//代下单-注册会员并返回会员信息
export const addMember = (parmas: any) => {
  return axios.post<any>(`/api/member/addMember`, parmas);
};
//代下单-下单
export const createOrder = (parmas: any) => {
  return axios.post<any>(`/api/goods/createOrder`, parmas);
};